﻿using ManagementSystem.App_LocalResources;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ManagementSystem.Models
{
    /// <summary>
    /// 通用Json返回数据格式
    /// </summary>
    public class JsonResultModel
    {
        /// <summary>
        /// 返回代码 200 代表正常
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 返回消息
        /// </summary>
        public string message { get; set; }
        public dynamic data { get; set; }

        public JsonResultModel()
        {
            this.code = Code.SUCCESS;
            this.message = Message.SUCCESS;
            this.data = new { };
        }

        public JsonResultModel(string code,string message,dynamic data)
        {
            this.code = code;
            this.message = message;
            this.data = data;
        }
    }
}